Because for most frames during a workspace switch it's not changing and
we can repaint it faster if it's cached on the GPU as a single texture.
This seems to reduce the render time for workspace switching by more
than 20%.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1356
var WorkspaceSwitcherPopupList = GObject.registerClass(
class WorkspaceSwitcherPopupList extends St.Widget {
_init() {
- super._init({ style_class: 'workspace-switcher' });
+ super._init({
+ style_class: 'workspace-switcher',
+ offscreen_redirect: Clutter.OffscreenRedirect.ALWAYS,
+ });
this._itemSpacing = 0;
this._childHeight = 0;